<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>测试</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
  </head>
  <body>
    <form action="" method="post">
      <input type="text" name="username" id="" />
      <input type="text" name="password" id="" />
      <input type="submit" value="提交" />
      <button id="btn">查询</button>
    </form>
    <input type="text" placeholder="查询" id="ipt" />
    <script>
      $("#ipt").blur(function () {
        console.log($("#ipt").val());
        $.get("/aaa", { val: $("#ipt").val() }, function (data) {
          console.log(data);
        });
        // $.get(
        //   "api.tianxingccc.com/api/get_cx_answer",
        //   {
        //     keyword: $("#ipt").val(),
        //   },
        //   function (data) {
        //     console.log(data);
        //   }
        // );
      });
    </script>
  </body>
</html>
